<div class="modal fade bs-modal-md" id="modelContent">
	<div class="modal-dialog modal-md">
        <div class="modal-content"></div>
    </div>
</div> 
<div class="portlet box green">
	<div class="portlet-title">
		<div class="caption">
			<i class="fa fa-search"></i>查询内容
		</div>
		<div class="tools">
			<a href="javascript:;" class="collapse right" data-original-title="" title=""> </a>
		</div>
		<div class="actions">
			<a href="javascript:;" class="btn white btn-sm ajax-search"><i class="fa fa-search"></i> 查询 </a>
			<a href="javascript:;" class="btn white btn-sm search-reset"><i class="fa fa-eraser"></i> 清除 </a>
		</div>
	</div>
	<div class="portlet-body form" style="display: block;">
		<form action="/categoryAttr/list.do" class="form-horizontal" method="get" id="searchForm">
			<div class="form-body">
				<div class="row">
					<div class="col-md-3">
						<label class="control-label col-md-4">所属类别：</label> 
						<div class="col-md-8">
							<input class="form-control typeahead" type="text" name="name" value="$!name" autocomplete="off">
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
</div>
<div class="portlet box green">
    <div class="portlet-title">
		<div class="caption">
			<i class="fa fa-cogs"></i>数据列表
		</div>
		<div class="tools">
			<a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
		</div>
		<div class="actions">
			<a href="#modelContent" thref="/categoryAttr/add" class="btn white btn-sm ajax-model-get" data-toggle="modal">
				<i class="fa fa-plus"></i> 新增
			 </a>
		</div>
    </div>
	<div class="portlet-body">
	    <div class="dataTables_wrapper no-footer">
			<div class="table-scrollable">
		        <table class="table table-striped table-bordered table-hover">
		            <thead>
		                <tr>
		                    <th> 所属类别 </th>
		                    <th> 属性名称 </th>
		                    <th> 属性排序 </th>
		                    <th> 属性值 </th>
		                    <th class="col-md-2"> 操作 </th>
		                </tr>
		            </thead>
		            <tbody>
		                 #foreach ($!item in $!pageCategoryAttr.result)
		                 #set($category = $map.get($!item))
		                 <tr>
		                     <td> $!category.name </td>
		                     <td> $!item.name </td>
		                     <td> $!item.sort </td>
		                     <td> $!item.value </td>
		                     <td>
		                        <a href="#modelContent" class="btn green btn-outline btn-sm  ajax-model-get " data-toggle="modal" thref="/categoryAttr/edit.do?id=$!item.id&$!queryString">
									<i class="fa fa-edit"></i>修改
								</a>
								<a class="btn green btn-outline btn-sm  btn-sm ajax-delete"  href="javascript:;" thref="/categoryAttr/delete?id=$!item.id">
									<i class="fa fa-trash"></i>删除
								</a>
		                     </td>
		                 </tr>
		                 #end
		            </tbody>
		        </table>
			</div>
		#set($page=$pageCategoryAttr)
		#set($pageUrl="/categoryAttr/list?$!queryUrl&pageNo=")
		#parse("_page.htm")
		</div>
	</div>
</div>
<script type="text/javascript">
ComponentsTypeahead.init({url:"categoryAttr/getName"});
</script>